<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Responder comentário</title>
</head>
<body>
	<f:view>
	<h1>Responda ao comentário:</h1>
		<h:panelGroup
			style="border-right-style: solid; border-top-width: 1px; border-left-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-bottom-style: solid; border-left-width: 1px; border-top-style: solid; display: block; margin-top: 20px; margin-left: 10px">
			<h:outputText value="#{gerenciadorAnuncios.comentario.nome}"
				style="display: block; font-weight: bold;"></h:outputText>
			<h:outputText value="#{gerenciadorAnuncios.comentario.mensagem}"
				style="display: block; font-style: italic;"></h:outputText>
		</h:panelGroup>
		<h:form style="margin-top: 20px; margin-left: 10px">
			<h:inputHidden id="comentario"
				value="#{gerenciadorAnuncios.comentario.id}"></h:inputHidden>
			<h:inputHidden id="nome" value='#{gerenciadorAnuncios.resposta.nome}'></h:inputHidden>
			<h:panelGrid border="0" columns="2">
				<h:inputTextarea id="resposta"
					value="#{gerenciadorAnuncios.resposta.mensagem }"
					style="width: 230px; height: 100px; " required="true"
					requiredMessage="Preencha sua resposta"></h:inputTextarea>
				<h:message for="resposta" style="color:red;"></h:message>
			</h:panelGrid>
			<h:commandButton value="Responder comentário"
				action="#{gerenciadorAnuncios.responderComentario}"
				style="margin-top: 20px;margin-bottom:10px"></h:commandButton>
		</h:form>
		<h:form>
			<h:commandLink style="display: block; margin-top: 10px"
				action="index">
				<h:outputText value="< Voltar"></h:outputText>
			</h:commandLink>
		</h:form>
	</f:view>
</body>
</html>